Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close PIL Image after use #71

Merged
merged 2 commits into from
Jul 17, 2024
Merged

Close PIL Image after use #71

merged 2 commits into from
Jul 17, 2024

Conversation

donaldgray
Copy link
Member

PDFs that have a lot of images that require resizing can see memory leaks as the PIL image stays in memory (see #42).

Updated PdfRasterizer class to close image after use and return the image path only, rather than full Image object to avoid future issues with consumer attempting to use a closed image.

Avoids potential issues with consumer trying to use closed image
@donaldgray donaldgray requested a review from fmcc July 16, 2024 14:08
@donaldgray donaldgray marked this pull request as ready for review July 16, 2024 14:08
@donaldgray donaldgray merged commit ed07588 into main Jul 17, 2024
1 check passed
@donaldgray donaldgray deleted the bugfix/memory_leak branch July 17, 2024 10:14
@donaldgray donaldgray mentioned this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants